package domain;

public class Position 
{

	private int x;
	private int y;
	
	
	public Position(int x, int y)
	{
		this.x = x;
		this.y = y;
	}
	
	public int getX()
	{
		return x;
	}
	
	public int getY()
	{
		return y;
	}
	
	public Position clone()
	{
		return new Position(x, y);
	}
	
	@Override public boolean equals(Object object)
	{
		if(!(object instanceof Position))
			return false;
		
		if(x != ((Position)object).x)
			return false;
		
		if(y != ((Position)object).y)
			return false;
		
		return true;
	}
	
	@Override public int hashCode()
	{
		return x + y;
	}
	
	@Override public String toString()
	{
		return "x:" + x + " y:" + y;
	}

}
